public class TestDemo {
    public static void main(String[] args) {
        int n = 1000;
        for (n = 1000; n <= 2000 ; n++) {
            if(n%100 != 0 && n%4 == 0 || n%400 == 0){
                System.out.println(n);
            }
        }
    }
}
